package com.ingsing.tourism.mapper;

import com.ingsing.tourism.entity.User;

import java.util.Date;

/**
 * @Author houg
 * @create 2019/10/20 19:57
 * @explain 
 */

public interface IUserMapper {
    //根据主键删除
    int deleteByPrimaryKey(Integer userId);
    //插入对象
    int insert(User record);
    //选择性插入
    int insertSelective(User record);
    //根据主键查询对象
    User selectByPrimaryKey(Integer userId);
    //根据主键选择性更新
    int updateByPrimaryKeySelective(User record);
    //根据主键更新
    int updateByPrimaryKey(User record);
    //根据用户名登录
    User selectByUsername(String username);
    //邮箱登录
    User selectByEmail(String email);
    //手机号登录
    User selectByPhone(String phone);
    //关闭账户
    int offAccount(Integer userId);
    //禁用账户
    int disableAccount(Integer userId);
    //异常账户
    int abnormalAccount(Integer userId);
    //设置登录时间
    int setLastLogin(Date lastLogin,Integer userId);


}